package com.ruoyi.hospital.service.operation.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.hospital.mapper.operation.OperationLogisticsMapper;
import com.ruoyi.hospital.domain.operation.OperationLogistics;
import com.ruoyi.hospital.service.operation.IOperationLogisticsService;

/**
 * 物流公司Service业务层处理
 * 
 * @author wendao
 * @date 2024-09-14
 */
@Service
public class OperationLogisticsServiceImpl implements IOperationLogisticsService 
{
    @Autowired
    private OperationLogisticsMapper operationLogisticsMapper;

    /**
     * 查询物流公司
     * 
     * @param id 物流公司主键
     * @return 物流公司
     */
    @Override
    public OperationLogistics selectOperationLogisticsById(Integer id)
    {
        return operationLogisticsMapper.selectOperationLogisticsById(id);
    }

    /**
     * 查询物流公司列表
     * 
     * @param operationLogistics 物流公司
     * @return 物流公司
     */
    @Override
    public List<OperationLogistics> selectOperationLogisticsList(OperationLogistics operationLogistics)
    {
        return operationLogisticsMapper.selectOperationLogisticsList(operationLogistics);
    }

    /**
     * 新增物流公司
     * 
     * @param operationLogistics 物流公司
     * @return 结果
     */
    @Override
    public int insertOperationLogistics(OperationLogistics operationLogistics)
    {
        operationLogistics.setCreateTime(DateUtils.getNowTimeSecond());
        return operationLogisticsMapper.insertOperationLogistics(operationLogistics);
    }

    /**
     * 修改物流公司
     * 
     * @param operationLogistics 物流公司
     * @return 结果
     */
    @Override
    public int updateOperationLogistics(OperationLogistics operationLogistics)
    {
        operationLogistics.setUpdateTime(DateUtils.getNowTimeSecond());
        return operationLogisticsMapper.updateOperationLogistics(operationLogistics);
    }

    /**
     * 批量删除物流公司
     * 
     * @param ids 需要删除的物流公司主键
     * @return 结果
     */
    @Override
    public int deleteOperationLogisticsByIds(Integer[] ids)
    {
        return operationLogisticsMapper.deleteOperationLogisticsByIds(ids);
    }

    /**
     * 删除物流公司信息
     * 
     * @param id 物流公司主键
     * @return 结果
     */
    @Override
    public int deleteOperationLogisticsById(Integer id)
    {
        return operationLogisticsMapper.deleteOperationLogisticsById(id);
    }
}
